﻿#ifndef __GUIGEOMETRYINTERSECTIONDIALOG_H__
#define __GUIGEOMETRYINTERSECTIONDIALOG_H__

#include "GUIGeometryBaseDialog.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"

namespace Ui { class GUIGeometryIntersectionDialog; }
namespace Interface
{
    class FITKAbsGeoModelSegment;
    class VirtualShape;
}
namespace GUI {

    class GUIGeometryDialogAPI GUIGeometryIntersectionDialog : public GUIGeometryBaseDialog
    {
        Q_OBJECT

    public:
        /**
         * @brief  构造函数
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        GUIGeometryIntersectionDialog(Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief    析构函数
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-21
         */
        ~GUIGeometryIntersectionDialog();

    private:
        /**
         * @brief    初始化
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-21
         */
        void init();
        /**
         * @brief    获取设置的名称
         * @return   QString
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-21
         */
        QString getNameText() override;
        /**
         * @brief    拾取完成操作器,点击后，触发
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-21
         */
        virtual void pickFinishedOper() override;
        /**
         * @brief    从界面获取数据，更新到数据对象中
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-21
         */
        virtual void getDataFormWidget() override;

    private slots:
        /**
         * @brief  线1选取按钮
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        void on_pushButton_Pick_clicked();
        /**
         * @brief  线2选取按钮
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        void on_pushButton_Pick_2_clicked();
        /**
         * @brief  确认按钮
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief  关闭按钮
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        void on_pushButton_Cancel_clicked();

    private:
        /**
         * @brief  ui
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        Ui::GUIGeometryIntersectionDialog *_ui= nullptr;
        /**
         * @brief  判断线1，线2的标志位
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        int _flag = 0;
        /**
         * @brief  要求交点的线1
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        Interface::VirtualShape _virtualShapes1;
        /**
         * @brief  要求交点的线2
         * @author guqingtao (15598887859@163.com)
         * @date   2025-02-21
         */
        Interface::VirtualShape _virtualShapes2;
    };
}
#endif // GUIGEOMETRYINTERSECTIONDIALOG_H

